#include <Ray.hpp>

namespace Olorin
{
	namespace Framework
	{
		// Constructor
		Ray::Ray()
		{
			position = 0;
			direction = 0;
		}

		Ray::Ray(const Vector3& position, const Vector3& direction)
		{
			this->position = position;
			this->direction = direction;
		}

		// Accessors
		const Vector3& Ray::getPosition() const
		{
			return position;
		}

		const Vector3& Ray::getDirection() const
		{
			return direction;
		}

		const Vector3 Ray::getPointAt(const float& parameter) const
		{
			return position + parameter * direction;
		}

		// Mutators
		void Ray::setPosition(const Vector3& position)
		{
			this->position = position;
		}

		void Ray::setDirection(const Vector3& direction)
		{
			this->direction = direction;
		}
	}
}